BASS_SlideVolume

Slides the digital output master volume and/or the CD volume from the current level to the target level.

BOOL WINAPI BASS_SlideVolume(
    DWORD volume,
    DWORD period,
    DWORD mode
);

Parameters
volumeThe target volume... 0 (min) - 100 (max).
periodDelay in milliseconds between each volume inc/decrement. The total time taken by a volume slide is calculated by delta volume * period.
modeDigital and/or CD volume flags.
BASS_SLIDE_DIGITALSlide the digital master volume.
BASS_SLIDE_CDSlide the CD volume.

Return value
If succesful, then TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.

Error codes
BASS_ERROR_INIT BASS_Init has not been successfully called.
BASS_ERROR_CDINIT BASS_CDInit has not been successfully called.
BASS_ERROR_CDVOLBASS could not find a volume control for the CD.

Remarks
The volume level sliding is done in the background, so your program can still do other things (eg. playing sounds) while the levels are sliding. Use BASS_IsSliding to check if the volume levels are still sliding after calling BASS_SlideVolume.

Example
A one second fade-in of the digital master volume, from silent to the maximum level.

BASS_SetVolume(0); // silence the digital master volume
...
// period = 1000ms / 100 = 10ms
BASS_SlideVolume(100,10,BASS_SLIDE_DIGITAL); // start the slide

See also
BASS_IsSliding